import request from '../request'
import type { UserInfoType } from '@/types/modules/login'

export enum securityApiEnum {
  securityPolicyLoginDetail = 'auth/securityPolicy/login/detail',
  loginPasswordUpdate = 'auth/user/login/password/update',
  userQueryPage = 'auth/user/queryPage',
  userStateUpdate = 'auth/user/state/update',
  userExportData = 'auth/user/exportData',
}

/**添加用户验证是否符合安全策略(登录页) */
export const securityPolicyLoginDetail = (data: any) => request.POST({ url: securityApiEnum.securityPolicyLoginDetail, data })

/**修改密码(登录页) */
export const LoginPasswordUpdate = (data: any) => request.POST({ url: securityApiEnum.loginPasswordUpdate, data })

/**用户管理-分页 */
export const userQueryPage = (data: any) => request.POST<UserInfoType[]>({ url: securityApiEnum.userQueryPage, data })

/**用户信息启用/禁用 */
export const userStateUpdate = (data: any) => request.POST<boolean>({ url: securityApiEnum.userStateUpdate, data })

/**导出 */
export const userExportData = (data: any) => request.POST<string>({ url: securityApiEnum.userStateUpdate, data })
